<style lang="scss" scoped>
.coupons {
  margin-top: 3.5rem;
  background-color: #fff;
  border-radius: 8px;
  padding: 1.5rem 1rem 1rem;
  box-sizing: border-box;
  position: relative;

  .title {
    width: 12rem;
    height: 3rem;
    background: var(--btn_color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    line-height: 3rem;
    text-align: center;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    letter-spacing: 0.3rem;
    font-size: 1.4rem;
    span {
      display: inline-block;
      width: 1rem;
      height: 1rem;
      border-radius: 1rem;
      background-color: #ffdb89;
    }
    span:nth-child(1) {
      margin-right: 0.5rem;
    }
    span:nth-child(2) {
      margin-left: 0.2rem;
    }
    .triangle_left_border {
      width: 0;
      height: 0;
      border-bottom: 1.5rem solid var(--btn_color);
      border-left: 1.5rem solid transparent;
      position: absolute;
      left: 0%;
      top: 0%;
      margin-left: -1.5rem;
    }
    .triangle_right_border {
      width: 0;
      height: 0;
      border-bottom: 1.5rem solid var(--btn_color);
      border-right: 1.5rem solid transparent;
      position: absolute;
      left: 100%;
      top: 0%;
    }
  }

  // 参与群体
  .group {
    margin-top: 1rem;
    .group_one {
      margin-bottom: 1rem;
      font-size: 2rem;
    }
    .group_two {
      display: flex;
      justify-content: space-around;
      flex-direction: row;
      flex-wrap: wrap;
      .group_active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        width: 20%;
        margin-bottom: 10px;
        .imgs {
          width: 40px;
          height: 40px;
          overflow: hidden;
          border-radius: 20px;
          img {
            width: 100%;
            height: 100%;
          }
        }
        span {
          width: 100%;
          text-align: center;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }

    .group_three {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 2.5rem;
      // margin-bottom: 2.5rem;
      .conter_group_one {
        display: flex;
        align-items: center;
        .max {
          display: flex;
          flex-direction: column;
          margin-left: 10px;
          font-size: 1.6rem;
        }
      }
      .conter_group_two {
        display: flex;
        flex-direction: column;
        text-align: right;
        font-size: 1.6rem;
        color: #999;
      }
    }
  }
}
</style>
<template>
  <div class="coupons" :style="{ '--btn_color': btn_color }">
    <div class="title">
      <span></span>
      <div>参与群体</div>
      <span></span>
      <div class="triangle_left_border"></div>
      <div class="triangle_right_border"></div>
    </div>
    <div class="group">
      <div class="group_one">
        浏览({{ activityItem.browse_num }})
      </div>
      <div class="group_two">
        <div class="group_active" v-for="(item, i) in visitList" :key="i">
          <div class="imgs">
            <img :src="item.avatar" alt="" />
          </div>
          <span style="margin-top: 8px; font-size: 1.5rem">{{
            item.nickname
          }}</span>
        </div>
      </div>
    </div>
  </div>
</template> 
<script>
import { Tab, Tabs, List, Loading } from "vant";
// import CaseList from "@/components/CaseList.vue";
export default {
  name: "ActiveContent",
  components: {
    [List.name]: List,
    [Tab.name]: Tab,
    [Tabs.name]: Tabs,
    [Loading.name]: Loading,
  },
  props: {
    activityItem: {
      type: Object,
      required: true,
    },
    visitList: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {
      btn_color: "",
      height: null,
      introduce: [],
    };
  },
  created() {
    this.btn_color = this.activityItem.btn_color;
    this.introduce = this.activityItem.introduce;
  },
  mounted() {},
  methods: {},
};
</script>
